@use 'sass:color';

@import '_variables';

.custom-container {
  .custom-container-title {
    font-weight: 600;
    margin-bottom: -0.4rem;
  }

  &.tip,
  &.warning,
  &.danger {
    padding: 0.1rem 1.5rem;
    border-left-width: 0.5rem;
    border-left-style: solid;
    margin: 1rem 0;
  }

  &.tip {
    background-color: #f3f5f7;
    border-color: $tipColor;
  }

  &.warning {
    background-color: color.scale($warningColor, $lightness: 90%);
    border-color: $warningColor;
    color: color.scale($warningColor, $lightness: -50%);

    .custom-container-title {
      color: color.scale($warningColor, $lightness: -25%);
    }

    a {
      color: $textColor;
    }
  }

  &.danger {
    background-color: color.scale($dangerColor, $lightness: 90%);
    border-color: $dangerColor;
    color: color.scale($dangerColor, $lightness: -50%);

    .custom-container-title {
      color: color.scale($dangerColor, $lightness: -25%);
    }

    a {
      color: $textColor;
    }
  }

  &.details {
    display: block;
    position: relative;
    border-radius: 2px;
    margin: 1.6em 0;
    padding: 1.6em;
    background-color: #eee;

    h4 {
      margin-top: 0;
    }

    figure,
    p {
      &:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
      }
    }

    summary {
      outline: none;
      cursor: pointer;
    }
  }
}
